<?php
if (empty ($result2)) {
    echo "Tidak ada data";
}
else {
?>
<style>
	h4 {
		font-size:20px;
		font-weight:bold;
		margin:0px;
		margin-bottom:5px;
	}
	page{
		border:1px solid black;
	}
	p{
		margin:5px;
	}
	.header{
		width:95%;
		border-bottom:2px double black;
		padding:10px 0;
	}
	.header img{
		width:100px;
		height:auto;
	}

	table.gridtable {
		font-size:11px;
		color:#333333;
		border-width: 1px;
		border-color: #666666;
		border-collapse: collapse;
	}
	table.gridtable th {
		border-width: 1px;
		padding: 8px;
		border-style: solid;
		border-color: #666666;
		background-color: #dedede;
	}
	table.gridtable td {
		border-width: 1px;
		padding: 8px;
		border-style: solid;
		border-color: #666666;
		background-color: #ffffff;
	}

	table.gridtable2 {
		font-size:12px;
		color:#333333;
		border-width: 0px;
		border-color: #666666;
		border-collapse: collapse;
	}

	table.gridtable3 {
		font-size:15px;
		color:#333333;
		border-width: 0px;
		border-color: #666666;
		border-collapse: collapse;
	}

	table.gridtable2 th {
		border-width: 0px;
		padding: 8px;
		border-style: solid;
		border-color: #666666;
		background-color: #dedede;
	}
	table.gridtable2 td {
		border-width: 0px;
		padding: 8px;
		border-style: solid;
		border-color: #666666;
		background-color: #ffffff;
	}
</style>
<table class="gridtable3" style="width:100%">
	<tr>
		<td style="font-size:20px"><strong>Laporan <?=$tipe;?> Keuangan Desa</strong></td>
	</tr>
	<tr>
		<td><?=$alamat_des;?></td>
	</tr>
	<tr>	
		<td>Periode : <strong><?=$tgl_awal;?> s/d <?=$tgl_akhir;?></strong></td>
	</tr>
</table>
<hr />
<table class="gridtable" style="width:100%">
	<tr>
		<th style="width:14%">Tanggal Transaksi</th>		
		<th style="width:10%">Kode Akun</th>		
		<th style="width:17%">Nama Akun</th>
		<th style="width:20%">Keterangan</th>
		<th style="width:13%">Debit</th>
		<th style="width:13%">Kredit</th>
		<th style="width:13%">Saldo</th>
	</tr>
	<?php foreach($result2->result() as $row){?>
	<tr>
		<td><?=$row->tgl_transaksi?></td>
		<td><?=$row->kode_akun?></td>
		<td><?=$row->deskrip?></td>
		<td><?=$row->deskripsi?></td>
		<td>Rp. <?=FormatRupiah($row->debit)?></td>
		<td>Rp. <?=FormatRupiah($row->kredit)?></td>
		<td>Rp. <?=FormatRupiah($row->saldo)?></td>
	</tr>
	<?php } ?>
<!--/table>
<table class="gridtable" style:"width:100%"-->
	<!--tr>
		<th style="width:75%" colspan="4">Total Saldo:</th>
		<th style="width:25%" colspan="2" style="text-align:right;">Rp. <?=FormatRupiah($total,2)?></th>
	</tr-->
</table>
<?php } ?>


